package com.lagou.ex.service;

import com.lagou.ex.dao.ResumeRepository;
import com.lagou.ex.entity.TbResume;
import com.lagou.ex.entity.TbUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Transactional
public class ResumeService {
    @Autowired
    private ResumeRepository resumeRepository;

    public List<TbResume> findAll() {
        return resumeRepository.findAll();
    }

    public TbResume findOne(Long id) {
        System.out.println("findOne=" + id);
        return resumeRepository.findById(id);
    }

    public void saveBean(TbResume bean) {
        resumeRepository.save(bean);
    }

    public void updateBean(TbResume bean) {
        resumeRepository.save(bean);
    }

    public void deleteBean(Long id) {
        resumeRepository.delete(id);
    }

}
